var date = [{
  none: '../img/signin/has.png',
  score: '+5',
  day: '1天'
}, {
  none: '../img/signin/none.png',
  score: '+10',
  day: '2天'
}, {
  none: '../img/signin/none.png',
  score: '+20',
  day: '3天'
}, {
  none: '../img/signin/none.png',
  score: '+35',
  day: '4天'
}, {
  none: '../img/signin/none.png',
  score: '+50',
  day: '5天及以上'
}]
Page({
  data: {
    head:'../img/signin/head.png',
    hand:'../img/signin/hand.png',
    none: '../img/signin/none.png',
    score:date[0].score,
    num:date[0].score,
    day:date[0].day,
    date:date
  },
  goShop(e){
    wx.navigateTo({
      url: '../coupon/coupon',
    })
  },
  changeImg(e){
    for(var i=0; i<date.length; i++)
      date[i].none = '../img/signin/none.png'
    var id = e.currentTarget.id
    var has = '../img/signin/has.png'
    date[id].none = has
    this.setData({date:date,score:date[id].score,num:date[id].score,day:date[id].day})
  },
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: '每日签到'
    })
  }
})